package uia.alumni.pms;

import java.io.PrintWriter;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
import javax.servlet.http.HttpServletRequest;

import uia.alumni.data.User;
import uia.alumni.web.Page;
import static uia.alumni.profile.Constants.*;
import static uia.alumni.web.Constants.*;


/**
 * Page for viewing your inbox for private messages.
 * @author Lars-Erik
 */
public class Pms extends Page {

    /** SERVLET_NAME is used for consistency checking of web.xml */
    public static final String SERVLET_NAME = "pms.pms";

    @PersistenceUnit(name=PERSISTENCE_UNIT)
    private EntityManagerFactory emf;


  public Pms() {
        super(null);
    }


    /**
     * View personal messages
     * @param out
     * @param request
     */
    public void writeBody(PrintWriter out, HttpServletRequest request) {
        EntityManager em = emf.createEntityManager();
        User user = getLoggedInUser(em, request);

            out.println(tagH1("Personal messages"));
            out.println("<p><strong>Title</strong></p>");

        
        
            out.println("<br><br>");
            out.println(tagP(tagA(WritePms.SERVLET_NAME, "Skriv melding")));
    }

    public final static long serialVersionUID = 1;

}
